{{! -------------------------------------------------------------------------- }}
{{! Copyright 2002-2023, OpenNebula Project, OpenNebula Systems                }}
{{!                                                                            }}
{{! Licensed under the Apache License, Version 2.0 (the "License"); you may    }}
{{! not use this file except in compliance with the License. You may obtain    }}
{{! a copy of the License at                                                   }}
{{!                                                                            }}
{{! http://www.apache.org/licenses/LICENSE-2.0                                 }}
{{!                                                                            }}
{{! Unless required by applicable law or agreed to in writing, software        }}
{{! distributed under the License is distributed on an "AS IS" BASIS,          }}
{{! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   }}
{{! See the License for the specific language governing permissions and        }}
{{! limitations under the License.                                             }}
{{! -------------------------------------------------------------------------- }}

<div class="row" name="str_ar_tab_id" str_ar_tab_id="{{str_ar_tab_id}}">
  <div class="large-12 columns">
    <input wizard_field="TYPE" type="radio" name="{{str_ar_tab_id}}_ar_type" id="{{str_ar_tab_id}}_ar_type_ip4" value="IP4"/><label for="{{str_ar_tab_id}}_ar_type_ip4">{{tr "IPv4"}}</label>
    <input wizard_field="TYPE" type="radio" name="{{str_ar_tab_id}}_ar_type" id="{{str_ar_tab_id}}_ar_type_ip4_6" value="IP4_6"/><label for="{{str_ar_tab_id}}_ar_type_ip4_6">{{tr "IPv4/6"}}</label>
    <input wizard_field="TYPE" type="radio" name="{{str_ar_tab_id}}_ar_type" id="{{str_ar_tab_id}}_ar_type_ip6" value="IP6"/><label for="{{str_ar_tab_id}}_ar_type_ip6">{{tr "IPv6"}}</label>
    <input wizard_field="TYPE" type="radio" name="{{str_ar_tab_id}}_ar_type" id="{{str_ar_tab_id}}_ar_type_ether" value="ETHER"/><label for="{{str_ar_tab_id}}_ar_type_ether">{{tr "Ethernet"}}</label>
  </div>
</div>
<div class="row">
  <div class="medium-6 columns ar_input type_ip4 type_ip4_6">
    <label for="{{str_ar_tab_id}}_ip_start">{{tr "First IPv4 address"}}</label>
    <input wizard_field="IP" type="text" name="IP" id="{{str_ar_tab_id}}_ip_start"/>
  </div>
  <div class="medium-6 columns ar_input type_ip4 type_ip4_6 type_ip6 type_ether">
    <label for="{{str_ar_tab_id}}_mac_start">{{tr "First MAC address"}}</label>
    <input wizard_field="MAC" type="text" name="MAC" id="{{str_ar_tab_id}}_mac_start"/>
  </div>
  <div class="medium-6 columns ar_input type_ip4 type_ip4_6 type_ip6 type_ether">
    <label for="{{str_ar_tab_id}}_size">{{tr "Size"}}</label>
    <input wizard_field="SIZE" required type="number" min="0" name="SIZE" id="{{str_ar_tab_id}}_size" />
  </div>
  <div class="medium-6 columns collapse ar_input type_ip4_6 type_ip6 switch left" style="margin-bottom:28px" >
    <label for="{{str_ar_tab_id}}_">{{tr "SLAAC"}}</label>
    <input class="switch-input slaac" id="{{str_ar_tab_id}}_slaac" name="SLAAC" type="checkbox">
    <label class="switch-paddle" for="{{str_ar_tab_id}}_slaac"></label>
  </div>
</div>
<div class="row slaac_true">
  <div class="medium-6 columns ar_input type_ip4_6 type_ip6">
    <label for="{{str_ar_tab_id}}_global_prefix">{{tr "IPv6 Global prefix"}}</label>
    <input wizard_field="GLOBAL_PREFIX" type="text" name="GLOBAL_PREFIX" id="{{str_ar_tab_id}}_global_prefix"/>
  </div>
  <div class="medium-6 columns ar_input type_ip4_6 type_ip6">
    <label for="{{str_ar_tab_id}}_ula_prefix">{{tr "IPv6 ULA prefix"}}</label>
    <input wizard_field="ULA_PREFIX" type="text" name="ULA_PREFIX" id="{{str_ar_tab_id}}_ula_prefix"/>
  </div>
</div>
<div class="row slaac_false">
  <div class="medium-6 columns ar_input type_ip4_6 type_ip6">
    <label for="{{str_ar_tab_id}}_ipv6">{{tr "IPv6"}}</label>
    <input wizard_field="IP6" type="text" name="IP6" id="{{str_ar_tab_id}}_ipv6"/>
  </div>
  <div class="medium-6 columns ar_input type_ip4_6 type_ip6">
    <label for="{{str_ar_tab_id}}_prefix_length">{{tr "Prefix length"}}</label>
    <input wizard_field="PREFIX_LENGTH" type="text" name="PREFIX_LENGTH" id="{{str_ar_tab_id}}_prefix_length"/>
  </div>
</div>
<div class="row">
  <div class="medium-12 columns">
    {{#advancedSection (tr "Advanced Options") }}
      <fieldset>
        <legend>{{tr "Custom attributes"}}</legend>
        <div class="row" id="{{str_ar_tab_id}}_custom_tags">
          <div class="12 columns">
            {{{customTagsHTML}}}
          </div>
        </div>
      </fieldset>
      <fieldset class="sec_groups_datatable">
        <legend>{{tr "Security Groups"}}</legend>
        <div class="row" id="{{str_ar_tab_id}}_security_groups">
          {{{securityGroupsTableHTML}}}
        </div>
      </fieldset>
      <div class="ar_input type_ip4 type_ip4_6 type_ip6">
        <fieldset>
          <legend>{{tr "IPAM"}}</legend>
          <div class="row">
            <div class="medium-6 columns">
              <label for="{{str_ar_tab_id}}_ipam_mad">{{tr "IPAM driver"}}</label>
              <input wizard_field="IPAM_MAD" type="text" name="IPAM_MAD" id="{{str_ar_tab_id}}_ipam_mad"/>
            </div>
          </div>
        </fieldset>
      </div>
    {{/advancedSection}}
  </div>
</div>
